﻿<ion-view view-title="我的旗舰店" class="myworld_mine_scqd">

	<ion-content>
		<div class="row text-center font-large-my  padding-0">
			<div class="col" on-tap="activeSlide(0)" ng-class="selectIndex==0?'top-activated':''">
				我的旗舰店
			</div>
			<div class="col" on-tap="activeSlide(1)" ng-class="selectIndex==1?'top-activated':''">
				授信欠款
			</div>
			<div class="col" on-tap="activeSlide(2)" ng-class="selectIndex==2?'top-activated':''">
				申请代理
			</div>
		</div>

		<ion-slide-box delegate-handle="main-handle" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">
			<!--我的旗舰店-->
			
			<ion-slide>
				<div class="list list-borderless margin-bottom-10">
					<li class="item item-input item-input-inset item-icon-right">
						<label class="font-gray-my">区域：</label>
						<div class="input-value small" ng-click="doSelectProvince(store)">{{input.province.name}}</div>
						<div class="input-value small" ng-click="doSelectCity(store)">{{input.city.name}}</div>
						<div class="input-value small" ng-click="doSelectDistrict(store)">{{input.district.name}}</div>			
				</select>
					
					</li>
					<li class="item item-input item-input-inset item-icon-right"> 	<label class="item-input-wrapper">
 			   	  	  <input type="text" ng-model="input.key"/>
 			   	  	 </label>
						<i class="icon ion-search font-1rem-my" on-tap="doSearch()"></i></li>
						<ion-scroll  direction="y" ng-style="myObj" lazy-scroll>
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<div class="margin-bottom-10" ng-repeat="data in datas.data"><!--循环的div-->
						<li class="item item-thumbnail-left" style="padding-bottom: 0;padding-right: 5px;">
							<img src="{{data.image_place1}}" style="border-radius:50% ;" />
							<p>名称：{{data.store_name}}</p>
							<p>电话：{{data.company_ctel}}</p>
							<p>地址：{{data.company_region}}-{{data.company_addr}}</p>
							<div style="position:absolute;bottom:2px;" class=" font-large-my">
								<span class="positive" on-tap="showPopup(data.store_id)">详情 </span>
								<span class="positive  margin-left-10-my" on-tap="showPopup_debt(data.store_id,data.store_name)">查看欠款</span>
								<span class="bian_red assertive border-radius-my" style="margin-left: 2rem;"  on_tap="showPopup_red(data.store_id)">&nbsp;红&nbsp;包&nbsp;</span>
							</div>
						</li>
						<li class="item item-text-wrap padding-5">
							<p>{{data.company_profile}}</p>
						</li>
					</div>	<!--循环的div-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		      </ion-scroll>
				</div>
			</ion-slide>

			<ion-slide>
				
				<!--还款记录-->
				<div class="list">
					<li class="item item-input item-select">
						旗舰店：
						<div class="input-value" ng-click="doSelectStore()" style="padding-right: 30px;">{{input.store_select.name}}</div>
					</li>
					<li class="item item-input">
						授信额度:<span class="assertive">{{credits.credit_line|currency:'￥'}}</span>
					</li>
					<li class="item item-input item-borderless">
						 当前欠款：<span class="assertive">{{credits.debt_total|currency:'￥'}}
					</li>
					<ion-scroll  direction="y" ng-style="myObj" lazy-scroll>
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
					<div style="margin-bottom: 1rem;"></div>
					<div  style="margin-bottom: 1rem;" ng-repeat="credit in credits.credit"><!--循环的div-->
						<li class="item item-input">
							旗舰店：{{credit.store_name}}
						</li>
						<li class="item positive-bg padding-0">
							<div class="light-bg margin-left-10-my padding-10">
								还款记录
							</div>
						</li>
						<li class="item padding">
							还款<span class="royal">{{credit.repayment|currency:'￥'}}</span> <span class="right-zhang font-large-my font-gray-my">{{credit.time}}</span>
						</li>
						<li class="item padding  font-large-my font-gray-my">
							还款方式：{{credit.type_name}} <span class="right-zhang">状态：{{credit.status_name}}</span>
						</li>
						<li class="col col-25 item-image" ng-repeat="image in credit.voucher" ng-show="credit.voucher.image!=''&&credit.voucher.image!=null">
							<img src="{{image.image}}" />
						</li>
					</div><!--循环的div-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		      </ion-scroll>
				</div>
			</ion-slide>

			<ion-slide>
				<ion-scroll  direction="y" ng-style="myObj" lazy-scroll>
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
				<div class="item padding-5">
					<div class="button-bar">
						<div class="button button-small stable-border" style="border-right:1px solid #b2b2b2 ;" ng-class="{'button-assertive':looking}" on-tap="change_looking()">审核中</div>
						<div class="button button-small stable-border col-offset-3" style="border-right:1px solid #b2b2b2 ;" ng-class="{'button-assertive':past}" on-tap="change_past()">已通过</div>
						<div class="button button-small col-offset-3 stable-border" ng-class="{'button-assertive':notpast}" on-tap="change_notpast()">未通过</div>
					</div>
				</div>
				
				<div>
					
					<div class="list list-borderless" ng-show="looking" ng-repeat="auditing in auditing.apply">
					<!--<div class="list list-borderless" ng-repeat="auditing in aud.auditing_apply">-->
						<li class="item item-input padding-0">
							<span class="input-label">&nbsp;申请日期：</span> {{auditing.apply_time}}
						</li>
						<li class="item item-input padding-0">
							<span class="input-label">&nbsp;旗舰店：</span> {{auditing.store_name}}
						</li>
						<li class="item item-input padding-0">
							<span class="input-label">&nbsp;品牌：</span> {{auditing.brand_name}}
						</li>
						<li class="item item-divider text-center">申请内容</li>
						<li class="item padding-5">
							销售额：{{auditing.annual_sales}}
						</li>
						<li class="item padding-5">
							加盟店数量：{{auditing.dealer_num}}个
						</li>
						<li class="item padding-5">
							代理预计销售额：{{auditing.stimated_sales}}
						</li>
						<li class="item padding-5 item-text-wrap">
							相同品类其他已代理品牌：{{auditing.sold_brand}}
						</li>
						<li class="item padding-5 item-text-wrap">
							自我描述：{{auditing.apply_desc}}
						</li>
					<!--</div>-->
				</div>
				</div>
				<div>
					<div class="list list-borderless"  ng-show="past" ng-repeat="pass in passed.apply">
					<!--<div class="list list-borderless" ng-repeat="pass in past.passed_apply">-->
						<li class="item item-input padding-0">
							<span class="input-label">&nbsp;申请日期：</span> {{pass.apply_time}}
						</li>
						<li class="item item-input padding-0">
							<span class="input-label">&nbsp;旗舰店：</span> {{pass.store_name}}
						</li>
						<li class="item item-input padding-0">
							<span class="input-label">&nbsp;品牌：</span> {{pass.brand_name}}
						</li>
						<li class="item item-divider text-center">申请内容</li>
						<li class="item padding-5">
							销售额：{{pass.annual_sales}}
						</li>
						<li  class="item padding-5">
							加盟店数量：{{pass.dealer_num}}个
						</li>
						<li class="item padding-5">
							代理预计销售额：{{pass.stimated_sales}}
						</li>
						<li class="item padding-5 item-text-wrap">
							相同品类其他已代理品牌：{{pass.sold_brand}}
						</li>
						<li class="item padding-5 item-text-wrap">
							自我描述：{{pass.apply_desc}}
						</li>
					<!--</div>-->
				</div>
				</div>
				<div>
					<div class="list list-borderless" ng-show="notpast" ng-repeat="un in unpass.apply">
					<!--<div class="list list-borderless" ng-repeat="un in un.unpass_apply">-->
						<li class="item item-input padding-0">
							<span class="input-label">&nbsp;申请日期：</span> {{un.apply_time}}
						</li>
						<li class="item item-input padding-0">
							<span class="input-label">&nbsp;旗舰店：</span> {{un.store_name}}
						</li>
						<li class="item item-input padding-0">
							<span class="input-label">&nbsp;品牌：</span> {{un.brand_name}}
						</li>
						<li class="item item-divider text-center">申请内容</li>
						<li class="item padding-5">
							销售额：{{un.annual_sales}}
						</li >
						<li class="item padding-5">
						加盟店数量：{{un.dealer_num}}个	
						</li>
						<li class="item padding-5">
							代理预计销售额：{{un.stimated_sales}}
						</li>
						<li class="item padding-5 item-text-wrap">
							相同品类其他已代理品牌：{{un.sold_brand}}
						</li>
						<li class="item padding-5 item-text-wrap">
							自我描述：{{un.apply_desc}}
						</li>
					</div>
				</div>
				</div>
				<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
		      </ion-scroll>
			</ion-slide>
			
		</ion-slide-box>
	</ion-content>
	
</ion-view>